import {reqCategoryList} from '@/api'
const state = {
    getCategoryList:[]
};

const actions = {
    async getCategroy({commit}){
        const result =  await  reqCategoryList();
        if(result.code === 200){
            commit('GET_CATEGROY',result.data)
        }
    }
};

const mutations = {
    GET_CATEGROY(state,value){
        state.getCategoryList = value
    }
};

const getters = {};

export default{
    state,
    actions,
    mutations,
    getters
}